package com.dh.order.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.dh.order.message.StreamClient;
import com.mysql.fabric.xmlrpc.base.Data;

/** 
* @author 作者 dinghao
* @version 创建时间：2018年11月19日 上午10:54:00 
* @Description 类说明 :
*/
@RestController
public class SendMessageController {

	@Autowired
	private StreamClient streamClient;
	
	@GetMapping("/sendMessage")
	public void process() {
		String message = "now "+ new Data();
		streamClient.output().
		send(MessageBuilder.withPayload(message).build());
	}
	
}
